package org.mbds.wolf.android.idgo800;

public class Constants {
	
	// Device types labels
	public final static String LBL_DEVICE_TYPE_OMAPI_DEFAULT 		= "OMAPI Default Reader";
	public final static String LBL_DEVICE_TYPE_OMAPI_UICC 			= "OMAPI UICC Reader";
	public final static String LBL_DEVICE_TYPE_OMAPI_ESE 			= "OMAPI SE Reader";
	public final static String LBL_DEVICE_TYPE_OMAPI_SD 			= "OMAPI SD Reader";
	public final static String LBL_DEVICE_TYPE_BLE			 		= "Bluetooth Smart Reader";
	public final static String LBL_DEVICE_TYPE_USB			 		= "USB Reader";
	public final static String LBL_DEVICE_TYPE_NFC			 		= "NFC Reader";
	public final static String LBL_DEVICE_TYPE_SOFT			 		= ".NET MSCM Emulator";
	
	// MD roles
    public final static byte ROLE_EVERYONE 							= 0x00; //0
	public final static byte ROLE_USER 								= 0x01; //1
	public final static byte ROLE_ADMIN 							= 0x02; //2
	public final static byte ROLE_ROLE3 							= 0x04; //4
	public final static byte ROLE_ROLE4 							= 0x08; //8
	public final static byte ROLE_ROLE5 							= (byte)0x10; //16
	public final static byte ROLE_ROLE6 							= (byte)0x20; //32
	public final static byte ROLE_ROLE7 							= (byte)0x40; //64
	public final static byte ROLE_ALL_ROLES 						= (byte)0xFF; //255
    public final static byte ROLE_CARD_ADMIN 						= (byte)0x80; //128
    
    // ACCESS RIGHTS
    public static final int AC_ADMIN 								= 0;
    public static final int AC_USER 								= 1;
    public static final int AC_EVERYONE 							= 2;
    public static final byte RIGHT_EXECUTE 							= 0x01;
    public static final byte RIGHT_WRITE 							= 0x02;
    public static final byte RIGHT_READ 							= 0x04;

	// MD Actions
	public final static int ACTION_INIT 							= 0;
	public final static int ACTION_FINALIZE 						= 9999;
	
	
	public final static int ACTION_AUTH_EX 							= 1;
	public final static int ACTION_AUTH_PIN 						= 2;
	public final static int ACTION_BEGIN_TRANSAC 					= 3; //Deprecated
	public final static int ACTION_CHANGE_AUTHENTICATOR_EX 			= 4;
	public final static int ACTION_CHANGE_REF_DATA 					= 5;
	public final static int ACTION_CONSTRUCT_DH_AGREEMENT 			= 6;
	public final static int ACTION_CREATE_CONTAINER 				= 7;
	public final static int ACTION_CREATE_DIR 						= 8;
	public final static int ACTION_CREATE_FILE 						= 9;
	public final static int ACTION_CREATE_FILE_EX					= 10;
	public final static int ACTION_DEAUTH 							= 11;
	public final static int ACTION_DEAUTH_EX 						= 12;
	public final static int ACTION_DELETE_CONTAINER					= 13;
	public final static int ACTION_DELETE_DIR						= 14;
	public final static int ACTION_DELETE_FILE 						= 15;
	public final static int ACTION_END_TRANSAC 						= 16; // Deprecated
	public final static int ACTION_EXTERNAL_AUTH 					= 17;
	public final static int ACTION_FLUSH_CARD_CACHE 				= 18;
	public final static int ACTION_GENERIC_COMMAND 					= 19;
	public final static int ACTION_GET_CARD_PROP 					= 20;
	public final static int ACTION_GET_CARD_TYPE 					= 21;
	public final static int ACTION_GET_CHALLENGE 					= 22;
	public final static int ACTION_GET_CHALLENGE_EX 				= 23;
	public final static int ACTION_GET_CONTAINER 					= 24;
	public final static int ACTION_GET_CONTAINER_PROP 				= 25;
	public final static int ACTION_GET_FILES 						= 26;
	public final static int ACTION_GET_FILE_PROP 					= 27;
	public final static int ACTION_GET_KEYS_AND_CERTIFICATES 		= 28;
	public final static int ACTION_GET_KEYS_AND_CERTIFICATES_EX 		= 29;
	public final static int ACTION_GET_LAST_ERROR 					= 30;
	public final static int ACTION_GET_SERIAL_NUMBER 				= 31;
	public final static int ACTION_GET_TRIES_REMAINING 				= 32;
	public final static int ACTION_GET_VERSION 						= 33;
	public final static int ACTION_QUERY_CAPABILITIES 				= 34;
	public final static int ACTION_QUERY_FREE_SPACE 				= 35;
	public final static int ACTION_QUERY_KEY_SIZES 					= 36;
	public final static int ACTION_QUERY_KEY_SIZES_EX 				= 37;
	public final static int ACTION_READ_FILE 						= 38;
	public final static int ACTION_RSA_DECRYPT 						= 39;
	public final static int ACTION_SET_CARD_PROP 					= 40;
	public final static int ACTION_SET_CONTAINER_PROP 				= 41;
	public final static int ACTION_SIGN_DATA 						= 42;
	public final static int ACTION_WRITE_FILE 						= 43;

	public final static int ACTION_GET_IS_ADMIN_PERSONALIZED 		= 44;
	public final static int ACTION_GET_IS_AUTHENTICATED 			= 45;
	public final static int ACTION_GET_IS_ECC 						= 46;
	public final static int ACTION_GET_IS_USER_PERSONALIZED 		= 47;
	
	// Error codes
	// Error timeout (no command response in time)
	public final static int ERR_TIMEOUT 							= 9999;
	// Error action not found
	public final static int ERR_ACTION_NOT_FOUND					= 8888;
	
	// Error messages
	public static final String	ERR_MSG_TIME_OUT					= "WOLF: IDGo800 API TIME OUT";  	//9999	
	public static final String	ERR_MSG_ACTION_NOT_FOUND			= "WOLF: IDGo800 ACTION NOT FOUND"; //8888
	// Unknown error number
	public static final String	ERR_MSG_UNKNOWN	= "WOLF: Unknown error number exception!"; 

	// MD Error messages

	public static final String	ERR_MSG_GE_OK						= "IDGo800: GE_OK"; 					// 0
	public static final String	ERR_MSG_GE_NO_SERVICE				= "IDGo800: GE_NO_SERVICE"; 			// 1
	public static final String	ERR_MSG_GE_NOT_SUPPORTE				= "IDGo800: GE_NOT_SUPPORTED"; 			// 10
	public static final String	ERR_MSG_GE_UI_CANCELLED_BY_USER		= "IDGo800: GE_UI_CANCELLED_BY_USER"; 	// 100
	public static final String	ERR_MSG_GE_UNKNOWN					= "IDGo800: GE_UNKNOWN"; 				// 1000
	public static final String	ERR_MSG_GE_UI_PIN_CONF_WRONG		= "IDGo800: GE_UI_PIN_CONF_WRONG"; 		// 101
	public static final String	ERR_MSG_GE_UI_TIMEOUT				= "IDGo800: GE_UI_TIMEOUT"; 			// 102
	public static final String	ERR_MSG_GE_UNAUTHORIZED_ACCESS		= "IDGo800: GE_UNAUTHORIZED_ACCESS"; 	// 11
	public static final String	ERR_MSG_GE_BUFFER_TOO_SMALL			= "IDGo800: GE_BUFFER_TOO_SMALL"; 		// 12
	public static final String	ERR_MSG_GE_BAD_ARGUMENT				= "IDGo800: GE_BAD_ARGUMENT"; 			// 2
	public static final String	ERR_MSG_GE_PIN_POLICY_1				= "IDGo800: GE_PIN_POLICY_1"; 			// 20
	public static final String	ERR_MSG_GE_TRANSACTION_LOCKED		= "IDGo800: GE_TRANSACTION_LOCKED"; 	// 200
	public static final String	ERR_MSG_GE_TRANSACTION_INVALID_ID	= "IDGo800: GE_TRANSACTION_INVALID_ID"; // 201
	public static final String	ERR_MSG_GE_PIN_POLICY_2				= "IDGo800: GE_PIN_POLICY_2"; 			// 21
	public static final String	ERR_MSG_GE_PIN_POLICY_3				= "IDGo800: GE_PIN_POLICY_3"; 			// 22
	public static final String	ERR_MSG_GE_PIN_POLICY_4				= "IDGo800: GE_PIN_POLICY_4"; 			// 23
	public static final String	ERR_MSG_GE_PIN_POLICY_5				= "IDGo800: GE_PIN_POLICY_5"; 			// 24
	public static final String	ERR_MSG_GE_PIN_POLICY_6				= "IDGo800: GE_PIN_POLICY_6"; 			// 25
	public static final String	ERR_MSG_GE_PIN_POLICY_7				= "IDGo800: GE_PIN_POLICY_7"; 			// 26
	public static final String	ERR_MSG_GE_PIN_POLICY_8				= "IDGo800: GE_PIN_POLICY_8"; 			// 27
	public static final String	ERR_MSG_GE_PIN_POLICY_9				= "IDGo800: GE_PIN_POLICY_9"; 			// 28
	public static final String	ERR_MSG_GE_PIN_POLICY_10			= "IDGo800: GE_PIN_POLICY_10"; 			// 29
	public static final String	ERR_MSG_GE_NULL_ARGUMENT			= "IDGo800: GE_NULL_ARGUMENT"; 			// 3
	public static final String	ERR_MSG_GE_WRONG_APP_SIGNATURE		= "IDGo800: GE_WRONG_APP_SIGNATUR"; 	// 300
	public static final String	ERR_MSG_GE_INVALID_SESSION_ID		= "IDGo800: GE_INVALID_SESSION_ID"; 	// 301
	public static final String	ERR_MSG_GE_NO_SESSION_AVAILABLE		= "IDGo800: GE_NO_SESSION_AVAILABLE"; 	// 302
	public static final String	ERR_MSG_GE_INVALID_CONTAINER_INDEX	= "IDGo800: GE_INVALID_CONTAINER_INDEX"; //	4
	public static final String	ERR_MSG_GE_NO_LICENSE				= "IDGo800: GE_NO_LICENSE"; 			//  400
	public static final String	ERR_MSG_GE_OUT_OF_RANGE_ARGUMENT	= "IDGo800: GE_OUT_OF_RANGE_ARGUMENT"; 	//  5
	public static final String	ERR_MSG_GE_BT_ADAPTER_DISABLED		= "IDGo800: GE_BT_ADAPTER_DISABLED"; 	//  500
	public static final String	ERR_MSG_GE_BLE_PAIRING_FAILED		= "IDGo800: GE_BLE_PAIRING_FAILED"; 	//  501
	public static final String	ERR_MSG_GE_DIRECTORY_NOT_FOUND6		= "IDGo800: GE_DIRECTORY_NOT_FOUND"; 	//  6
	public static final String	ERR_MSG_GE_FILE_NOT_FOUND			= "IDGo800: GE_FILE_NOT_FOUND"; 		//  7
	public static final String	ERR_MSG_GE_DIRECTORY_EXISTS			= "IDGo800: GE_DIRECTORY_EXISTS"; 		//  8
	public static final String	ERR_MSG_GE_FILE_EXISTS				= "IDGo800: GE_FILE_EXISTS"; 			//  9
}
